package com.da.javatest.leetCode;

/**
 * @author chenlida
 * @date 2018/12/19 17:40
 * @description
 */
public class Code137 {
    public int singleNumber(int[] nums) {
        for (int i = 0; i < nums.length; i++) {
            int flag = 0;
            for (int i1 = 0; i1 < nums.length; i1++) {
                if (nums[i] == nums[i1]) { flag++; }
            }
            if (flag == 1) { return nums[i]; }
        }
        return 0;
    }
}
